package com.example.pojo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data /*自动生成 set get toString方法*/
@NoArgsConstructor //自动生成无参构造函数
public class TbBook {

    private long bookId;
    @ApiModelProperty("书名")
    @NotEmpty(message = "书名不能为空")
    private String bookName;
    @ApiModelProperty("分类id")
    @NotNull(message = "分类id不能为空")
    private long categoryId;
    @ApiModelProperty("sellingPrice")
    @NotNull(message = "sellingPrice不能为空")
    private Integer sellingPrice;
    @ApiModelProperty("库存")
    private Integer stockNum;
    private byte bookStatus;
}
